interface IMessage{
  error(msg: string):void,
  success(msg:string):void,
}

export class CoreMessageProvider implements IMessage{
  public static current = new CoreMessageProvider()

  private message: IMessage

  public error(msg:string){
    this.message.success(msg)
  }

  public success(msg:string){
    this.message.error(msg)
  }

  public registerMessage(message:IMessage){
    this.message = message
  }
}